package com.yztc.yidoutang.activity.register_activity;

import android.app.Activity;
import android.content.Context;
import android.widget.Button;
import android.widget.EditText;

/**
 * 注册界面的接口统一管理类
 */
public class RegisterContract {
    interface View {
        // 输入框的文本变更事件
        void onEditTextTextChanged(String type, String text);

        // 获取验证码按钮的点击事件
        void onPostCodeClicked();

        // 隐藏/显示密码按钮的点击事件
        void onShowHidePswClicked(boolean isChecked);

        // 注册按钮的点击事件
        void onRegisterClicked();

        // 返回按钮的点击事件
        void onBackClicked();
    }

    interface Model {
        void onEditTextTextChanged(Context context, String type, String text, Button register);

        void onPostCodeClicked(Activity activity, EditText phone, Button post);

        void onShowHidePswClicked(EditText psw, boolean isChecked);

        void onRegisterClicked(EditText phone, EditText code, EditText psw);

        void onBackClicked(Activity activity);
    }

    interface Presenter {
        void onEditTextTextChanged(Context context, String type, String text, Button register);

        void onPostCodeClicked(Activity activity, EditText phone, Button post);

        void onShowHidePswClicked(EditText psw, boolean isChecked);

        void onRegisterClicked(EditText phone, EditText code, EditText psw);

        void onBackClicked(Activity activity);
    }
}